#include<stdio.h>
#include <stdlib.h>
/*
#include<quadmath.h>
const int N=1e8;

__float128 f(__float128 i){
    __float128 res=(__float128)1/(__float128)(i*(i+1)*(2*i+1));
    return res;
}

//计算pi
void float128Demo(){
    __float128 ans=3;
    for(int i=1;i<=N;i++){
        if(i%2==1)ans+=f(i);
        else ans-=f(i);
    }
    char s[100];
    quadmath_snprintf(s,sizeof(s),"%.40Qf",ans);
    puts(s);
}


void float128Demo1()
{
    __float128 r1;
    __float128 r2;
    __float128 r3;

    char buf[64];
    char *pEnd = buf;
    r1 = strtoflt128 ("1.234567890123456789   9.876543210987654321e5", &pEnd);
    r2 = strtoflt128 (pEnd, NULL);

    quadmath_snprintf (buf, sizeof buf, "%+-#*.20Qf", 64, r1);
    puts(buf);
    quadmath_snprintf (buf, sizeof buf, "%+-#*.20Qe", 64, r2);
    puts(buf);

    r3 = hypotq (r1, r2);
    quadmath_snprintf (buf, sizeof buf, "%.30Qe", 64, r3);
    puts(buf);
}
*/
